package plus.xj17520.org.mapper;

import plus.xj17520.org.domain.Department;
import plus.xj17520.basic.domain.BaseQuery;

import java.util.List;

/**
 * 部门的mapper
 */
public interface DepartmentMapper {

    //基础的查询
    List<Department> loadAll(BaseQuery query);

    Department loadById(Long id);

    void save(Department department);
    void update(Department department);
    void remove(Long id);

    //分页方法1.查询总条数
    Long queryCount(BaseQuery query);

    //分页方法2,查询当前页的数据
    List<Department> queryData(BaseQuery query);

    /**
     * 查询所有数据
     * @return
     */
    List<Department> findTree();

    void batchDelete(List<Long> ids);
}
